package com.bcu.cn.onlineexamsystem.Repository;

import com.bcu.cn.onlineexamsystem.user.entity.Score;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ScoreRepository extends JpaRepository<Score, Long> {
    // 根据学生ID查询成绩
    List<Score> findByStudentId(String studentId);

    // 根据课程ID查询成绩
    List<Score> findByCourseId(String courseId);

    // 根据课程ID和学生ID查询成绩
    Score findByCourseIdAndStudentId(String courseId, String studentId);
}
